import request from '@/config/request'
import type { PasswordForm, UserInfoForm } from '@/config/forms'

export default {
    login: (username : string, password : string, code : string) => {
        return request.post('/auth/login', {username, password, code})
    },
    captcha: () => {
        return request.post('/auth/captcha')
    },
    info: () => {
        return request.get('/auth/info')
    },
    updateInfo: (form : UserInfoForm) => {
        return request.post('/auth/info', form)  
    },
    password: ( passwordForm : PasswordForm) => {
        return request.post('/auth/password', passwordForm)
    }
}